import axios from '@/router/axios'
let baseURL = '/api/root'

export function getCode () {
  return axios.get(`${baseURL}/code`)// baseUrl公共url，顿号
}

export function login (formData) {
  return axios.post('/api/root/users/login', formData)
}

export function getManagers (query = {}) {
  return axios.get('/api/root/managers/list', {
    params: query
  })
}

export function delManagers (id) {
  return axios.post('/api/root/managers/del', id)
}

export function addManagers (formData) {
  return axios.post('/api/root/managers/add', formData)
}

export function updManagers (formData) {
  return axios.post('/api/root/managers/upd', formData)
}
